#include "CompareString.h"
// -1 means stringOne < stringTwo
// 1 means stringOne > stringTwo
// 0 means stringOne == stringTwo
int compare(char *stringOne,char *stringTwo)
{
	do 
	{
		if(*stringOne == *stringTwo
			&&*stringOne != '\0'
			&&*stringTwo != '\0')
		{
			stringOne++;
			stringTwo++;
			continue;
		}

		if(*stringOne == '\0'
			&&*stringTwo == '\0'
			)
			return 0;
		/*
		abc
		abcdef
		str1<str2
		*/
		if(*stringOne == '\0'
			&&*stringTwo != '\0'
			)
			return -1;

		if(*stringOne != '\0'
			&&*stringTwo == '\0'
			)
			return 1;

		if(*stringOne > *stringTwo)
			return 1;

		if(*stringOne < *stringTwo)
			return -1;

	} while (1);

	return -2;
}